#ifndef GRAPHICS_H
#define GRAPHICS_H

#include <string>
#include <SDL2/SDL.h>
#include <SDL2/SDL_opengl.h>

class cGraphics
{
    public:
        cGraphics();
        ~cGraphics();

        bool initGL();
        bool createWindow();
        bool resizeWindow(int width, int height);
        bool toggleFullscreen();
        bool setFullscreen(bool fullscreen);
        bool setTitle(std::string title);
        bool setVsync(bool vsync);
        bool vsyncEnabled();
        bool windowExists();
        void closeWindow();
        void render();
    private:
        bool m_fullscreen;
        bool m_created;
        bool m_vsync;
        SDL_Window* m_window;
        SDL_GLContext m_context;
        int m_width, m_height;
        std::string m_title;
};

#endif // GRAPHICS_H
